Optimal. Leaf size=181 \[ \frac {b F_1\left (1+n;1-\frac {m}{2},1-\frac {m}{2};2+n;\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}},\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right ) (d \sec (e+f x))^m (a+b \tan (e+f x))^{1+n} \left (1+\frac {a+b \tan (e+f x)}{-a+\sqrt {-b^2}}\right )^{-m/2} \left (1-\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )^{-m/2}}{\left (a^2+b^2\right ) f (1+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 187, normalized size of antiderivative = 1.03, number of steps
used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3593, 774, 138}
\begin {gather*} \frac {\cos ^2(e+f x) (d \sec (e+f x))^m \left (1-\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right )^{1-\frac {m}{2}} \left (1-\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )^{1-\frac {m}{2}} (a+b \tan (e+f x))^{n+1} F_1\left (n+1;1-\frac {m}{2},1-\frac {m}{2};n+2;\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}},\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )}{b f (n+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 138
Rule 774
Rule 3593
Rubi steps
\begin {align*} \int (d \sec (e+f x))^m (a+b \tan (e+f x))^n \, dx &=\frac {\left ((d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2}\right ) \text {Subst}\left (\int (a+x)^n \left (1+\frac {x^2}{b^2}\right )^{-1+\frac {m}{2}} \, dx,x,b \tan (e+f x)\right )}{b f}\\ &=\frac {\left (\cos ^2(e+f x) (d \sec (e+f x))^m \left (1-\frac {a+b \tan (e+f x)}{a-\frac {b^2}{\sqrt {-b^2}}}\right )^{1-\frac {m}{2}} \left (1-\frac {a+b \tan (e+f x)}{a+\frac {b^2}{\sqrt {-b^2}}}\right )^{1-\frac {m}{2}}\right ) \text {Subst}\left (\int x^n \left (1-\frac {x}{a-\sqrt {-b^2}}\right )^{-1+\frac {m}{2}} \left (1-\frac {x}{a+\sqrt {-b^2}}\right )^{-1+\frac {m}{2}} \, dx,x,a+b \tan (e+f x)\right )}{b f}\\ &=\frac {F_1\left (1+n;1-\frac {m}{2},1-\frac {m}{2};2+n;\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}},\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right ) \cos ^2(e+f x) (d \sec (e+f x))^m (a+b \tan (e+f x))^{1+n} \left (1-\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right )^{1-\frac {m}{2}} \left (1-\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )^{1-\frac {m}{2}}}{b f (1+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 9.03, size = 699, normalized size = 3.86 \begin {gather*} \frac {2 F_1\left (1+n;1-\frac {m}{2},1-\frac {m}{2};2+n;\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right ) (d \sec (e+f x))^m (a+b \tan (e+f x))^{1+n}}{f \left (2 b F_1\left (1+n;1-\frac {m}{2},1-\frac {m}{2};2+n;\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right ) \sec ^2(e+f x)+2 n F_1\left (1+n;1-\frac {m}{2},1-\frac {m}{2};2+n;\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right ) (b-a \tan (e+f x))-\frac {b (-2+m) (1+n) \left ((a-i b) F_1\left (2+n;1-\frac {m}{2},2-\frac {m}{2};3+n;\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right )+(a+i b) F_1\left (2+n;2-\frac {m}{2},1-\frac {m}{2};3+n;\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right )\right ) \sec ^2(e+f x) (a+b \tan (e+f x))}{(a-i b) (a+i b) (2+n)}+2 (m+n) F_1\left (1+n;1-\frac {m}{2},1-\frac {m}{2};2+n;\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right ) \tan (e+f x) (a+b \tan (e+f x))-\frac {m F_1\left (1+n;1-\frac {m}{2},1-\frac {m}{2};2+n;\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right ) \sec ^2(e+f x) (a+b \tan (e+f x))}{-i+\tan (e+f x)}-\frac {m F_1\left (1+n;1-\frac {m}{2},1-\frac {m}{2};2+n;\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right ) \sec ^2(e+f x) (a+b \tan (e+f x))}{i+\tan (e+f x)}\right )} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.37, size = 0, normalized size = 0.00 \[\int \left (d \sec \left (f x +e \right )\right )^{m} \left (a +b \tan \left (f x +e \right )\right )^{n}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (d \sec {\left (e + f x \right )}\right )^{m} \left (a + b \tan {\left (e + f x \right )}\right )^{n}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^m\,{\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^n \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________